
let TABText1 = document.querySelector('#TAB-text1')
let TABText3 = document.querySelector('#TAB-text3')
let TABText4 = document.querySelector('#TAB-text4')

get('#TAB-text1').onclick = function () { 
  get('.Tab-four').style.display='none'
  get('.Tab-one').style.display='block'
  get('.Tab-two').style.display='block'
  get('.Tab-three').style.display='block'}

  get('#TAB-text2').onclick = function () { 
    get('.Tab-one').style.display='block'
    get('.Tab-two').style.display='block'
    get('.Tab-three').style.display='none'
    get('.Tab-four').style.display='none'
    
  }
  get('#TAB-text3').onclick = function () { 
    get('.Tab-one').style.display='none'
    get('.Tab-two').style.display='none'
    get('#TabTh').style.display='block'
    get('.Tab-four').style.display='none'
  }
 

  
  get('#TAB-text4').onclick = function () { 
    get('.Tab-one').style.display='none'
    get('.Tab-two').style.display='none'
    get('.Tab-three').style.display='block'
    get('.Tab-four').style.display='block'
  }
 
  


let data = [
  {
    count: 4000,
    price: 1200,
    unitPrice: 0.3000
  },
  {
    count: 8000,
    price: 2000,
    unitPrice: 0.2500
  },
  {
    count: 40000,
    price: 8000,
    unitPrice: 0.2000
  },
];


data.forEach(function (v, i) {
  console.log(v.count);
  get('.ANamuber').innerHTML += `<span class="btnList">${v.count}</span>
     `
})



let xNumber = getAll('.Number span')
let btnArray = document.querySelectorAll('.btnList');
for (let i = 0; i < btnArray.length; i++) {

  btnArray[i].addEventListener('click', function () {
    ;
    get('.ANamuber span.active').classList.remove('active')
    this.classList.add('active')
    get('.iD-textSpan').innerHTML = `<p><span>￥${data[i].price}</span>约(${data[i].unitPrice.toFixed(4)}元)/次,仅限企业用户</p>`
    //这里的this指向的调用者，所以不用this，否则报错，或者渲染到了点击图标身上
  })
}

get('#ANamuber-img').onmouseover = function () {
  get('.ANamuber img').classList.remove('off')
}
get('#ANamuber-img').onmouseout = function () {
  get('.ANamuber img').classList.add('off')
}


// $(function(){
// 	$('.tabs').tabulous({
// 		effect: 'scale'
// 	});
// });



